package team.you.ticket.service.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import team.you.ticket.dao.TypeMapper;
import team.you.ticket.pojo.EchartsList;
import team.you.ticket.pojo.Result;
import team.you.ticket.service.TypeService;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService
{
    @Autowired
    private TypeMapper typeMapper;
    @Override
    public Result echarts() {
        Result result=new Result();
        List<EchartsList> data=typeMapper.selectEcharts();
        if (data!=null)
        {
            result.setMsg("获取成功");
            result.setData(data);
            return result;
        }
        else
        {
            result.setCode(500);
            result.setMsg("获取失败");
            return result;
        }
    }
}
